package com.aeye.mbr.common.exception;

public class KlsdRpcException extends RuntimeException{
    // 状态码：1成功，其他为失败
    public int code;

    // 成功为success，其他为失败原因
    public String localMessage;

    public KlsdRpcException(int code,String message){
        this.code = code;
        this.localMessage = message;
    }

    @Override
    public String getMessage() {
        if(null != localMessage)
        {
            return localMessage;
        }else
        {
            return super.getMessage();
        }
    }


    public int getCode(){
        return  code;
    }
}
